package com.kcwx.common.utils.bean;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.collections.CollectionUtils;

/**
 * 方法
 */
public class CollectionExtUtils extends CollectionUtils {
	public static <T> List<T> convertTarget(List<Object> sourceList, Class<T> targetClass) {
		ArrayList<T> targetList = new ArrayList<T>();
		try {
            for (Object source : sourceList) {
                T target = targetClass.newInstance();
                BeanUtils.copyProperties(source, target);
                targetList.add(target);
            }
		} catch (Exception ignored) {
		}
		return targetList;
	}
}